{template '_header'}
<div class='fui-page  fui-page-current order-pay-page'>
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back" onclick='history.back()'></a>
        </div>
        <div class="title" style='margin-right:-2rem;'>收银台</div>
        <div class="fui-header-right">
            <a href="{php echo mobileUrl('order')}" class="external">订单</a>
        </div>
    </div>
    <div class='fui-content margin'>
        <div class="fui-cell-group">
            <div class="fui-cell">
                <div class="fui-cell-label">订单编号</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark">{$order['ordersn']}</div>
            </div>
            <div class="fui-cell">
                <div class="fui-cell-label">订单金额</div>
                <div class="fui-cell-info"></div>
                <div class="fui-cell-remark noremark"><span class='text-danger'>￥{php echo number_format($order['price'],2)}</span>
                </div>
            </div>
        </div>


        <div class='fui-list-group' style="margin-top:10px;">
            {if $order['price'] == 0}
            <div class='fui-list pay-btn' data-type='credit'>
                <div class='fui-list-media'>
                    <i class='icon icon-money credit'></i>
                </div>
                <div class='fui-list-inner'>
                    <div class="title">确认支付</div>
                </div>
                <div class='fui-list-angle'>
                    <span class="angle"></span>
                </div>
            </div>
            {else}
            {if $wechat['success'] || (is_h5app() &&$payinfo['wechat'])}
            <div class='fui-list pay-btn' data-type='wechat' {if is_h5app()&&is_ios()}style="display: none;" id="threeWX"{/if}>
                <div class='fui-list-media'>
                    <i class='icon icon-wechat wechat'></i>
                </div>
                <div class='fui-list-inner'>
                    <div class="title">微信支付</div>
                    <div class="subtitle">微信安全支付</div>
                </div>
                <div class='fui-list-angle'><span class="angle"></span></div>
            </div>
            {/if}

            {if ($alipay['success'] && !is_h5app()) || (is_h5app() &&$payinfo['alipay'])}
            <div class='fui-list pay-btn' data-type='alipay'>
                <div class='fui-list-media'>
                    <i class='icon icon-alipay alipay'></i>
                </div>
                <div class='fui-list-inner'>
                    <div class="title">支付宝支付</div>
                    <div class="subtitle">使用支付宝进行支付</div>
                </div>
                <div class='fui-list-angle'><span class="angle"></span></div>
            </div>
            {/if}

            {if $credit['success']}
            <div class='fui-list pay-btn' data-type='credit'>
                <div class='fui-list-media'>
                    <i class='icon icon-money credit'></i>
                </div>
                <div class='fui-list-inner'>
                    <div class="title">{$_W['shopset']['trade']['moneytext']}支付</div>
                    <div class="subtitle">当前{$_W['shopset']['trade']['moneytext']}: <span class='text-danger'>￥{php echo number_format($member['credit2'],2)}</span>
                    </div>
                </div>
                <div class='fui-list-angle'>
		    <span class="angle">

		    </span>
                </div>
            </div>
            {/if}
            {if $cash['success']}
            <div class='fui-list pay-btn' data-type='cash'>
                <div class='fui-list-media'>
                    <i class='icon icon-deliver1 cash'></i>
                </div>
                <div class='fui-list-inner'>
                    <div class="title">货到付款</div>
                    <div class="subtitle">收到商品后进行付款</div>
                </div>
                <div class='fui-list-angle'><span class="angle"></span></div>
            </div>
            {/if}
            {/if}

        </div>
    </div>
    {template 'order/pay/wechat_jie'}
    <script language='javascript'>require(['biz/order/pay'], function (modal) {
        modal.init({php echo json_encode($payinfo)});
    });</script>
</div>

{if is_ios()}
    {php $initWX=true}
{/if}
{template '_footer'}